package com.ruoyi.system.service;

import java.util.List;

import com.ruoyi.system.domain.PoPublicOpinion;
import com.ruoyi.system.domain.RuleReceiver;
import com.ruoyi.system.domain.RuleWarningNoticeType;
import com.ruoyi.system.domain.WarningRule;

/**
 * 预警规则Service接口
 * 
 * @author ruoyi
 * @date 2021-06-19
 */
public interface IWarningRuleService 
{
    /**
     * 查询预警规则
     * 
     * @param id 预警规则ID
     * @return 预警规则
     */
    public WarningRule selectWarningRuleById(Long id);

    /**
     * 查询预警规则列表
     * 
     * @param warningRule 预警规则
     * @return 预警规则集合
     */
    public List<WarningRule> selectWarningRuleList(WarningRule warningRule);

    /**
     * 新增预警规则
     * 
     * @param warningRule 预警规则
     * @return 结果
     */
    public int insertWarningRule(WarningRule warningRule);

    /**
     * 修改预警规则
     * 
     * @param warningRule 预警规则
     * @return 结果
     */
    public int updateWarningRule(WarningRule warningRule);

    /**
     * 批量删除预警规则
     * 
     * @param ids 需要删除的预警规则ID
     * @return 结果
     */
    public int deleteWarningRuleByIds(Long[] ids);

    /**
     * 删除预警规则信息
     * 
     * @param id 预警规则ID
     * @return 结果
     */
    public int deleteWarningRuleById(Long id);

    public int deleteRuleReceiverByRuleId(Long id);

    public int deleteRuleMediaTypeByRuleId(Long id);

    public int deleteRuleEmotionByRuleId(Long id);

    public int deleteRuleWarningNoticeTypeByRuleId(Long id);

    public int insertRuleReceiver(WarningRule warningRule);

    public int insertRuleWarningNoticeType(WarningRule warningRule) ;

    public int insertRuleMediaType(WarningRule warningRule);

    public int insertRuleEmotion(WarningRule warningRule) ;

    public List<RuleReceiver> getReceiverByruleId(Long id);

    public List<RuleWarningNoticeType> getWarningNoticeTypeByruleId(Long id);

    WarningRule getWarningRuleData(WarningRule rule);

    /**
     * 根据预警规则获取舆情
     * @param rule
     * @return
     */
    List<PoPublicOpinion> getOpinionsByRule(WarningRule rule);
}
